﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_RptThueNhapKhauDenHanNop : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("CboDonVi")]
        private ComboBox _CboDonVi;
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("TxtSoNgay")]
        private NumericUpDown _TxtSoNgay;
        [AccessedThroughProperty("TxtTinhdenhan")]
        private DateTimePicker _TxtTinhdenhan;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private clsNhapKho objNK;

        public Frm_RptThueNhapKhauDenHanNop()
        {
            base.Load += new EventHandler(this.Frm_RptThueNhapKhauDenHanNop_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objNK = new clsNhapKho();
            this.InitializeComponent();
        }

        private void CmdCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            this.PrintReport();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_RptThueNhapKhauDenHanNop_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                BuildComboModule.BuildCombo(this.CboDonVi, modGeneral.ListDanhMuc.DonVi, true, "", "");
                this.CboDonVi.SelectedValue = modGeneral.H_CLIENT;
                this.TxtSoNgay.Value = decimal.Zero;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_RptThueNhapKhauDenHanNop));
            this.Label13 = new Label();
            this.TxtTinhdenhan = new DateTimePicker();
            this.Label1 = new Label();
            this.CboDonVi = new ComboBox();
            this.Label2 = new Label();
            this.TxtSoNgay = new NumericUpDown();
            this.GroupBox1 = new GroupBox();
            this.CmdCancel = new Button();
            this.CmdOK = new Button();
            this.TxtSoNgay.BeginInit();
            this.GroupBox1.SuspendLayout();
            this.SuspendLayout();
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            Point point = new Point(7, 0x30);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            Size size = new Size(0x49, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x2c;
            this.Label13.Text = "T\x00ednh đến hạn";
            this.TxtTinhdenhan.Format = DateTimePickerFormat.Short;
            point = new Point(0x69, 0x2c);
            this.TxtTinhdenhan.Location = point;
            this.TxtTinhdenhan.Name = "TxtTinhdenhan";
            size = new Size(0x73, 20);
            this.TxtTinhdenhan.Size = size;
            this.TxtTinhdenhan.TabIndex = 0x2b;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(7, 20);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x26, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x2a;
            this.Label1.Text = "Đơn vị";
            this.CboDonVi.FormattingEnabled = true;
            point = new Point(0x69, 0x11);
            this.CboDonVi.Location = point;
            this.CboDonVi.Name = "CboDonVi";
            size = new Size(0xe9, 0x15);
            this.CboDonVi.Size = size;
            this.CboDonVi.TabIndex = 0x29;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(7, 0x4a);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x51, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x2d;
            this.Label2.Text = "Số ng\x00e0y tới hạn";
            point = new Point(0x69, 0x48);
            this.TxtSoNgay.Location = point;
            this.TxtSoNgay.Name = "TxtSoNgay";
            size = new Size(0x34, 20);
            this.TxtSoNgay.Size = size;
            this.TxtSoNgay.TabIndex = 0x2e;
            this.GroupBox1.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.TxtSoNgay);
            this.GroupBox1.Controls.Add(this.CboDonVi);
            this.GroupBox1.Controls.Add(this.Label2);
            this.GroupBox1.Controls.Add(this.TxtTinhdenhan);
            this.GroupBox1.Controls.Add(this.Label13);
            point = new Point(5, 3);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            size = new Size(0x15a, 0x68);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 0x2f;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "T\x00f9y chọn";
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x10d, 0x70);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(0x4f, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 0x31;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0xba, 0x70);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4e, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 0x30;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(0x163, 0x8d);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.CmdCancel);
            this.Controls.Add(this.CmdOK);
            this.Controls.Add(this.GroupBox1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_RptThueNhapKhauDenHanNop";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "BC-0020             ";
            this.Text = "BANG KE THUE NHAP KHAU DEN HAN NOP";
            this.TxtSoNgay.EndInit();
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            this.ResumeLayout(false);
        }

        public void PrintReport()
        {
            int num = Convert.ToInt32(this.TxtSoNgay.Value);
            string strTinhDenHan = LVYModule.Date2Char(Conversions.ToString(DateAndTime.DateAdd(DateInterval.Day, (double) num, Conversions.ToDate(this.TxtTinhdenhan.Text))));
            this.Cursor = Cursors.WaitCursor;
            DataTable dataTable = this.objNK.GetDataPrintHanNopThue(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboDonVi.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim(), strTinhDenHan, Conversions.ToString(num));
            if (dataTable.Rows.Count == 0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Kh\x00f4ng c\x00f3 dữ liệu !", ""));
            }
            else
            {
                Rpt_BangKeThueNhapKhauDenHanNop nop = new Rpt_BangKeThueNhapKhauDenHanNop();
                try
                {
                    nop.SetDataSource(dataTable);
                    if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        nop.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEVIET, ""));
                    }
                    else
                    {
                        nop.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEANH, ""));
                    }
                    nop.SetParameterValue(1, modGeneral.Tranlated("Địa chỉ", "") + ": " + modGeneral.H_ADDRESS);
                    nop.SetParameterValue(2, modGeneral.Tranlated("M\x00e3 số thuế", "") + ": " + modGeneral.H_TAXCODE);
                    nop.SetParameterValue(3, modGeneral.Tranlated("Điện thoại", "") + ": " + modGeneral.H_TELEPHONE);
                    nop.SetParameterValue(4, modGeneral.Tranlated("Fax", "") + ": " + modGeneral.H_FAX);
                    nop.SetParameterValue(5, modGeneral.Tranlated("BẢNG K\x00ca THUẾ NHẬP KHẨU ĐẾN HẠN NỘP", ""));
                    nop.SetParameterValue(6, modGeneral.Tranlated("Số chứng từ", ""));
                    nop.SetParameterValue(7, modGeneral.Tranlated("Ng\x00e0y", ""));
                    nop.SetParameterValue(8, modGeneral.Tranlated("Số tờ khai", ""));
                    nop.SetParameterValue(9, modGeneral.Tranlated("Ng\x00e0y tờ khai", ""));
                    nop.SetParameterValue(10, modGeneral.Tranlated("H\x00f3a đơn NK", ""));
                    nop.SetParameterValue(11, modGeneral.Tranlated("Ng\x00e0y", ""));
                    nop.SetParameterValue(12, modGeneral.Tranlated("Ng\x00e0y nộp", ""));
                    nop.SetParameterValue(13, modGeneral.Tranlated("Thuế NK", ""));
                    nop.SetParameterValue(14, modGeneral.Tranlated("Thuế VAT", ""));
                    nop.SetParameterValue(15, modGeneral.Tranlated("STT", ""));
                    nop.SetParameterValue(0x10, modGeneral.Tranlated("Ng\x00e0y .... th\x00e1ng .... năm ............", ""));
                    nop.SetParameterValue(0x11, modGeneral.Tranlated("Lập biểu", ""));
                    MyProject.Forms.Frm_ViewReport.ReportViewer.ReportSource = nop;
                    MyProject.Forms.Frm_ViewReport.ReportViewer.DisplayGroupTree = false;
                    this.Cursor = Cursors.Default;
                    MyProject.Forms.Frm_ViewReport.ShowDialog();
                }
                catch (Exception exception1)
                {
                    ProjectData.SetProjectError(exception1);
                    Exception exception = exception1;
                    MessageBox.Show(exception.Message.ToString());
                    ProjectData.ClearProjectError();
                }
            }
        }

        internal virtual ComboBox CboDonVi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboDonVi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboDonVi = value;
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCancel_Click);
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click -= handler;
                }
                this._CmdCancel = value;
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual NumericUpDown TxtSoNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoNgay = value;
            }
        }

        internal virtual DateTimePicker TxtTinhdenhan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTinhdenhan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTinhdenhan = value;
            }
        }
    }
}

